import { InjectionToken } from '@angular/core';

export interface ApesMessageConfig {
  // For all messages as default config (can override when dynamically created)
  apesDuration?: number;
  apesPauseOnHover?: boolean;
  apesAnimate?: boolean;
  // For message container only
  apesMaxStack?: number;
  /* tslint:disable-next-line:no-any */
  [index: string]: any;
}

export const APES_MESSAGE_DEFAULT_CONFIG = new InjectionToken<ApesMessageConfig>('APES_MESSAGE_DEFAULT_CONFIG_PROVIDER');

export const APES_MESSAGE_CONFIG = new InjectionToken<ApesMessageConfig>('APES_MESSAGE_CONFIG');

export const APES_MESSAGE_DEFAULT_CONFIG_PROVIDER = {
  provide : APES_MESSAGE_DEFAULT_CONFIG,
  useValue: {
    apesDuration    : 3000,
    apesAnimate     : true,
    apesPauseOnHover: true,
    apesMaxStack    : 7
  }
};
